# Contributor: Orhun Parmaksız <orhunparmaksiz@gmail.com>
# Maintainer: Orhun Parmaksız <orhunparmaksiz@gmail.com>
pkgname=wiki-tui
pkgver=0.8.2
pkgrel=0
pkgdesc="Simple and easy to use Wikipedia Text User Interface"
url="https://github.com/Builditluc/wiki-tui"
arch="all"
license="MIT"
makedepends="
	cargo
	cargo-auditable
	openssl-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Builditluc/wiki-tui/archive/v$pkgver.tar.gz"
options="net"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm 755 target/release/wiki-tui -t "$pkgdir"/usr/bin
	install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
9240c17ab9410bf4182349701d06df73f56b11fceb24415c5249a982026fb236d87ab151b7a5b62683d70c38414fe67270b8f2012eb9188fddebf2d6c366fd22  wiki-tui-0.8.2.tar.gz
"
